import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 新增库存盘点内查询 */
export const getCheckPage = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/count/record/page"), {
    params: filerEmptyVal(params)
  });
};

/** 添加库存盘点记录 */
export const checkAdd = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/count/record/add"), { data });
};

/** 新增库存盘点内查询 */
export const getCheckSearch = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/count/record/add/search"), {
    params: filerEmptyVal(params)
  });
};

/** 删除库存盘点记录 */
export const checkDel = data => {
  return http.request<any>(
    "post",
    baseUrlApi("/count/record/delete?id=" + data.id),
    {
      data
    }
  );
};
